home *** CD-ROM | disk | FTP | other *** search
- Path: thor.tu.hac.com!collins
- From: collins@thor.tu.hac.com (Ron Collins)
- Newsgroups: comp.lang.c
- Subject: Re: Standard question - pointer initialization
- Date: 7 Mar 1996 23:01:41 GMT
- Organization: Advanced Depot Systems
- Message-ID: <4hnpsl$g8c@hacgate2.hac.com>
- References: <4hk9un$906@hammer.msfc.nasa.gov> <4hl6rr$nde@news.xs4all.nl> <313E6028.1C19@ix.netcom.com>
- NNTP-Posting-Host: thor.tu.hac.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Norman Bullen (nbullen@ix.netcom.com) wrote:
- [snip]
-
- : And there is no point in initializing a pointer when its declared if you
- : don't know at that point what an appropriate value might be. Use of a
- : pointer that has been initialized with an inappropriate value can be just
- : as bad for the program as using an uninitialize pointer.
-
- The popular convention (when initializing pointers) is to set them to
- NULL. This is the appropriate value to use when checking for invalid
- pointer usage.
-
- -- collins --
-